package com.tarena.luban.test.rpc;

import com.tarena.luban.test.service.WorkerService;
import com.tarena.luban.worker.server.client.WorkerApi;
import com.tarena.tp.luban.worker.server.dto.WorkerDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class WorkerRpcImpl implements WorkerApi {
    @Autowired
    private WorkerService workerService;
    @Override
    public WorkerDTO queryWorker(Long userId) {
        WorkerDTO workerDTO=workerService.queryWorkerByUserId(userId);
        return workerDTO;
    }
}
